﻿
Partial Class Public_Query
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            lblCount.Text = deleteCount()
        End If
    End Sub
    Private Function deleteCount() As String
        Dim sql As New MyStringBuilder
        Dim dat As New clsData

        sql.Length = 0
        sql.AppendFormat("Select count(VolunteerID) as VolunteerIDCount from ImportWorkHourRecord ")
        sql.AppendFormat("WHERE YEAR(EffectiveDate) IN ('3915','3916','3917','3918','3918','3920') ")


        Return dat.GetData(sql).Rows(0)("VolunteerIDCount").ToString().Trim()

    End Function

    Protected Sub btnDelete_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDelete.Click
        Dim sql As New MyStringBuilder
        Dim dat As New clsData

        sql.Length = 0
        sql.AppendFormat("delete from ImportWorkHourRecord ")
        sql.AppendFormat("WHERE YEAR(EffectiveDate) IN ('3915','3916','3917','3918','3918','3920') ")

        dat.AccData(sql)
    End Sub
End Class
